package com.itinsys.enma.manager;

import java.util.List;
import java.util.Map;

import com.itinsys.enma.domain.Period;
import com.itinsys.enma.domain.Planning;
import com.itinsys.enma.domain.dto.PlanningDTO;
import com.itinsys.enma.domain.response.PlanningResponse;
import com.itinsys.enma.exception.planning.PlanningExistsException;

/*
 * 
 * @author sperez
 *
 */

public interface PlanningManager {

	PlanningResponse addPlanning(PlanningDTO planningDTO);
	PlanningResponse getByUserName(String userName);
	PlanningResponse getPlanningResponseByPlanningId(int planningId);
	Planning getPlanningById(int planningId) throws PlanningExistsException;
	PlanningResponse deletePlanning(int id);
	List<String> conflictsByPlannId(int id);
	List<String> conflictsByReservId(long id);
	void updateLastModUpdate(int planningId);
	PlanningResponse getPlanningFromHistory(String userName, String strId,	Map<String, String> defaultPeriod);
	PlanningResponse getHistoryByCareerAndYear(String career, String year);
	PlanningResponse sendPlanning(int id);
	boolean addSpecialPeriod(Period period,int planningId);
	boolean deleteSpecialPeriod(Period period,int planningId);
	PlanningResponse getSendedPlannings();
	PlanningResponse confirmPlanning(int id);
	PlanningResponse unConfirmPlanning(int id);
	PlanningResponse executeGlobalConflict(int id);
	PlanningResponse unlockPlanning(int id);
	void directUpdate(Planning planning);
	PlanningResponse getByFiltersAndUserName(String userName, Map<String,String> planningFilters);
	List<String> getCareerNamesByUserName(String userName);

}
